package day2.about_attributes.demo2_state;
/**
 * 查看一个线程的状态
 */
public class Main {
    private static class MyThread extends Thread {
        @Override
        public void run() {
            System.out.println("打印。。。");
        }
    }
    public static void main(String[] args) {
//        Thread main = Thread.currentThread();
//
//        Thread.State state = main.getState();
//        System.out.println(state);

        MyThread t = new MyThread();
        System.out.println(t.getState());   // 还没有 start()，是 NEW
        t.start();
        System.out.println(t.getState());   // 就是 RUNNABLE
    }
}
